home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.20020314-20021006
/
000338_fdc@columbia.edu_Wed Sep 4 17:26:38 EDT 2002.msg
< prev
next >
Wrap
Text File
|
2002-10-06
|
3KB
|
79 lines
Article: 13668 of comp.protocols.kermit.misc
Path: newsmaster.cc.columbia.edu!news.columbia.edu!news-not-for-mail
From: fdc@columbia.edu (Frank da Cruz)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: i am sooooo confused
Date: 4 Sep 2002 17:26:15 -0400
Organization: Columbia University
Lines: 62
Message-ID: <al5tpn$409$1@watsol.cc.columbia.edu>
References: <al5rmn$t41$1@bob.news.rcn.net>
NNTP-Posting-Host: watsol.cc.columbia.edu
X-Trace: newsmaster.cc.columbia.edu 1031174776 13759 128.59.39.139 (4 Sep 2002 21:26:16 GMT)
X-Complaints-To: postmaster@columbia.edu
NNTP-Posting-Date: 4 Sep 2002 21:26:16 GMT
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:13668
In article <al5rmn$t41$1@bob.news.rcn.net>,
Donald MacQueen <dmacq@erols.com> wrote:
: we have a phone system at my kids school that spits out
: call records. i want to use kermit to capture them for analysis.
:
: this works interactively:
: log session
: set input echo off
: set modem type none
: set line /dev/ttyS0
: set carrier-watch off
: set speed 9600
: connect
:
: i can then see the records on the screen and they do get logged to a file.
:
: what i -really- want to do is to make this a weekly cron job that rotates
: or renames the log file, mails it off, etc.
:
: to the above:
: i removed the connect
: i added the line 'set background on'
: i added '#!/usr/local/bin/kermit' as the first line
:
: but it is not running in the background as expected. i am sure the mistake
: is elementary, and i will feel like a moron when i find it, but i have been
: messing with this for over a week now, looking at the scripts in the
: library, etc., and i am thoroughly confused.
:
OK, I realize the scripting tutorial says "take the CONNECT command out of
your script" but the script still needs *something* to make it read data from
the connection. So like the tutorial says, replace the CONNECT with INPUT.
The question is, what timeout and search string should you use?
You might want to use:
INPUT -1 STRING-THAT-WILL-NEVER-COME
-1 means wait forever for the string. Then if you specify a string that
won't ever come, it waits forever (logging all the while).
Or you might want to log for a certain amount of time, or until a certain
time ("help input" for more info). Or you might want to terminate when a
certain string comes in.
Another possibility is to log for (say) one hour, close the log, start
a new log. It's easy:
set input echo off
set modem type none
set line /dev/ttyS0
set carrier-watch off
set speed 9600
while 1 {
if open session-log close session-log
log session \v(ndate)_\v(time).log
if fail exit 1 Error opening log
input 3600 STRING-THAT-WILL-NEVER-COME
}
- Frank